import mysqlDemo as mysql

SQL = "select * from xbtx"
res = mysql.query(SQL)

with open("xbtx.txt","a",encoding="utf-8") as f:
    for row in res.fetchall():
        f.write(row[2]+"\n")
        f.write(row[3]+"\n\n")
        